

import { queryDisplayBlock } from '@/api/pmoReport/projectRevenue';

export default {
  data() {
    return {
      TableTitleVisible: false,
      displayBlockNameListFla: {},
      displayBlockNameList: [],
      displayBlockNameStr: {}
    }
  },
  methods: {
    getMixinColumn(data, name) {
      queryDisplayBlock(data).then(res => {
        if (res.status === 200) {
          this.displayBlockNameStr = {}
          if (res.data.length > 0) {
            this.displayBlockNameListFla[name] = name
          } else {
            this.displayBlockNameListFla[name] = '0'
          }
          this.displayBlockNameStr[name] = {}
          this.displayBlockNameList = res.data
          for (const i in this.displayBlockNameList) {
            this.displayBlockNameStr[name][this.displayBlockNameList[i]] = true
          }
          console.log(this.displayBlockNameStr, '1111')
        }
      })
    },
    getMixinDialogColumn(data, name) {
      queryDisplayBlock(data).then(res => {
        if (res.status === 200) {
          this.displayBlockNameStr = {}
          if (res.data.length > 0) {
            this.displayBlockNameListFla[name] = name
          } else {
            this.displayBlockNameListFla[name] = '0'
          }
          this.displayBlockNameStr[name] = {}
          this.displayBlockNameList = res.data
          for (const i in this.displayBlockNameList) {
            this.displayBlockNameStr[name][this.displayBlockNameList[i]] = true
          }
          this.TableTitleVisible = true
          console.log(this.displayBlockNameStr, '22222displayBlockNameStr')
        }
      })
    }
  }
}
